From: Clément Guérin Date: Sat, 14 Mar 2015 22:45:11 +0000 (+0100) Subject: screenshot: use integer coordinates X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1482 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fa4f6c456126ba3e20a57c3a4038512a2fbf533e;p=gnome-shell.git screenshot: use integer coordinates This fixes the shivery selection rectangle when making a region screenshot. https://bugzilla.gnome.org/show_bug.cgi?id=746223 --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 45f013c8e..50c5f9d07 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -292,6 +292,8 @@ const SelectArea = new Lang.Class({ return Clutter.EVENT_PROPAGATE; [this._lastX, this._lastY] = event.get_coords(); + this._lastX = Math.floor(this._lastX); + this._lastY = Math.floor(this._lastY); let geometry = this._getGeometry(); this._rubberband.set_position(geometry.x, geometry.y); @@ -302,6 +304,8 @@ const SelectArea = new Lang.Class({ _onButtonPress: function(actor, event) { [this._startX, this._startY] = event.get_coords(); + this._startX = Math.floor(this._startX); + this._startY = Math.floor(this._startY); this._rubberband.set_position(this._startX, this._startY); return Clutter.EVENT_PROPAGATE;